package cn.buk.tms.eotms.dao;

import cn.buk.common.sc.CommonSearchCriteria;
import cn.buk.tms.eotms.entity.AttractionInfo;
import cn.buk.tms.eotms.entity.AttractionPrice;
import cn.buk.tms.eotms.entity.TicketOrder;
import cn.buk.tms.eotms.sc.SearchFlightOrderCriteria;

import java.util.Date;
import java.util.List;

public interface AttractionDao {

  AttractionInfo getAttractionInfoById(int id);

  AttractionInfo getAttractionInfoByName(int ownerId, String attractionName);

  List<AttractionInfo> searchAttractions(int userId, CommonSearchCriteria sc);

  List<AttractionPrice> searchAttractionPrices(int userId, int attractionId, CommonSearchCriteria sc);

  AttractionPrice searchAttractionPriceByDate(int ownerId, int attractionId, Date travelDate);

  /**
   * 创建门票订单
   * @param userId
   * @param ticketOrder
   * @return
   */
  int createTicketOrder(int userId, TicketOrder ticketOrder);

  /**
   * 查找门票订单
   * @param ownerId
   * @param customerId
   * @param sc
   * @return
   */
  List<TicketOrder> searchTicketOrders(int ownerId, int customerId, SearchFlightOrderCriteria sc);

  TicketOrder getTicketOrderById(int orderId);

  int cancelTicketOrder(int ownerId, int customerId, String username, int orderId, String remark);

  /**
   * 用账户余额支付门票订单那
   * @param ownerId
   * @param customerEnterpriseId
   * @param customerId
   * @param userId
   * @param orderId
   * @return
   */
  int payTicketOrder(int ownerId, int customerEnterpriseId, int customerId, int userId, int orderId);
}
